﻿using System;
using System.Configuration;

namespace TempEmployees.BLL.UserAccess.ActiveDirectory.Configuration
{
    class ActiveDirectorySection : ConfigurationSection
    {
        [ConfigurationProperty("roles", IsRequired = true, IsDefaultCollection = true)]
        public RolesCollectionElement Roles
        {
            get { return this["services"] as RolesCollectionElement; }
            set { this["services"] = value; }
        }

        [ConfigurationProperty("departments", IsRequired = true)]
        public RolesCollectionElement Departments
        {
            get { return this["departments"] as RolesCollectionElement; }
            set { this["departments"] = value; }
        }

        [ConfigurationProperty("employeeRoleId", IsRequired = true)]
        public int EmployeeRoleID
        {
            get { return int.Parse(this["employeeRoleId"].ToString()); }
            set { this["employeeRoleId"] = value; }
        }
    }
}
